<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<h:head>
	<title></title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<link href="recursos/estilo.css" rel="stylesheet" type="text/css"
		media="screen" />
</h:head>

<h:body>
	<ui:composition template="template/common-nosidebar.xhtml">
		<ui:define name="content">
			<h:form>
				<p:accordionPanel id="apPrincipal" collapsible="false" styleClass="dashboard">
					<p:tab  title="#{msg.proxRodada}">
						<p:panel id="proxRodada" header="#{msg.proxRodada}">
							<h:outputLabel for="campeonato" value="#{msg.campeonato}" />
							<p:selectOneMenu value="#{palpiteMB.campeonato}"
								converter="campeonatoConverter">
								<f:selectItem itemLabel="#{msg.selecioneCampeonato}"
									itemValue=""></f:selectItem>
								<f:selectItems value="#{palpiteMB.campeonatos}" var="campeonato"
									itemLabel="#{campeonato.nome}" itemValue="#{campeonato}"></f:selectItems>
								<p:ajax listener="#{palpiteMB.proximaRodada}" event="change"
									update="apPrincipal" />
							</p:selectOneMenu>

							<h:outputText value="#{msg.proxRodada}" />
							<h:panelGrid>
								<ui:repeat value="#{palpiteMB.palpites}" var="palpite">
									<div class="palpites">
										<h:outputText styleClass="timeC"
											value="#{palpite.partida.timeCasa.nome} " />
										
										<p:inputText styleClass="golsC" size="1"
											value="#{palpite.golCasa}"></p:inputText>

										<h:outputText styleClass="x" value="x" />


										<p:inputText styleClass="golsV" size="1"
											value="#{palpite.golVisitante}"></p:inputText>


										<h:outputText styleClass="timeV"
											value="#{palpite.partida.timeVisitante.nome} " />
									</div>
								</ui:repeat>
							</h:panelGrid>
							<p:commandButton action="#{palpiteMB.salvarPalpiteProxRodada}" value="#{msg.salvar}"></p:commandButton>
						</p:panel>
					</p:tab>
					<p:tab title="#{msg.ranking}">
						<p:panel id="ranking" header="#{msg.ranking}">
							<ol>
								<li>X</li>
								<li>Y</li>
								<li>A</li>
								<li>B</li>
							</ol>
						</p:panel>
					</p:tab>

					<p:tab title="#{msg.resUltimaRodada}">

						<p:panel id="resUltimaRodada" header="#{msg.resUltimaRodada}">
							<h:outputText value="FLAMENGO" />
							<h:outputText value="1"></h:outputText>
							<h:outputText value="X"></h:outputText>
							<h:outputText value="Fluminense" />
							<h:outputText value="0"></h:outputText>
						</p:panel>
					</p:tab>
				</p:accordionPanel>


			</h:form>
		</ui:define>


	</ui:composition>
</h:body>
</html>